package com.lovejes.app.domain.base;

import java.io.Serializable;


/**
 * This is an object that contains data related to the t_jes_vote_group table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="t_jes_vote_group"
 */

public abstract class BaseTJesVoteGroup  implements Serializable {

	public static String REF = "TJesVoteGroup";
	public static String PROP_GROUPNAME = "Groupname";
	public static String PROP_ISPUB = "Ispub";
	public static String PROP_ID = "Id";


	// constructors
	public BaseTJesVoteGroup () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseTJesVoteGroup (java.lang.String id) {
		this.setId(id);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.String id;

	// fields
	private java.lang.String groupname;
	private java.lang.String ispub;



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="uuid"
     *  column="ID"
     */
	public java.lang.String getId () {
		return id;
	}

	/**
	 * Set the unique identifier of this class
	 * @param id the new ID
	 */
	public void setId (java.lang.String id) {
		this.id = id;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: GROUPNAME
	 */
	public java.lang.String getGroupname () {
		return groupname;
	}

	/**
	 * Set the value related to the column: GROUPNAME
	 * @param groupname the GROUPNAME value
	 */
	public void setGroupname (java.lang.String groupname) {
		this.groupname = groupname;
	}



	/**
	 * Return the value associated with the column: ISPUB
	 */
	public java.lang.String getIspub () {
		return ispub;
	}

	/**
	 * Set the value related to the column: ISPUB
	 * @param ispub the ISPUB value
	 */
	public void setIspub (java.lang.String ispub) {
		this.ispub = ispub;
	}




	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof com.lovejes.app.domain.TJesVoteGroup)) return false;
		else {
			com.lovejes.app.domain.TJesVoteGroup tJesVoteGroup = (com.lovejes.app.domain.TJesVoteGroup) obj;
			if (null == this.getId() || null == tJesVoteGroup.getId()) return false;
			else return (this.getId().equals(tJesVoteGroup.getId()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getId()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getId().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}


}